import request from '@/utils/request'

const path = '/card/type'

export function fetchList(query) {
  return request({
    url: path,
    method: 'get',
    params: query
  })
}

export function fetchType(id) {
  return request({
    url: path + '/' + id,
    method: 'get'
  })
}

export function createType(data) {
  return request({
    url: path,
    method: 'post',
    data
  })
}

export function modifyType(data) {
  return request({
    url: path + '/' + data.typeId,
    method: 'post',
    data
  })
}

export function removeType(data) {
  return request({
    url: path + '/remove/' + data.typeId,
    method: 'post',
    data
  })
}
